<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('用户 - 志愿者信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>手机号：</p>
                                <input type="text" name="mobile"/>
                            </li>
                           <!-- <li>
                                <p>null：</p>
                                <input type="text" name="salt"/>
                            </li>
                            <li>
                                <p>用户密码双md5：</p>
                                <input type="text" name="password"/>
                            </li>-->
                            <li>
                                <p>昵称：</p>
                                <input type="text" name="nickName"/>
                            </li>
                            <!--<li>
                                <p>用户头象：</p>
                                <input type="text" name="headImg"/>
                            </li>
                            <li>
                                <p>真实姓名：</p>
                                <input type="text" name="realName"/>
                            </li>
                            <li>
                                <p>token：</p>
                                <input type="text" name="accessToken"/>
                            </li>
                            <li class="select-time">
                                <p>过期时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTokenExpire]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTokenExpire]"/>
                            </li>
                            <li>
                                <p>刷新token：</p>
                                <input type="text" name="refreshToken"/>
                            </li>
                            <li>
                                <p>区域ID：</p>
                                <input type="text" name="areaId"/>
                            </li>
                            <li>
                                <p>志愿者ID：</p>
                                <input type="text" name="vid"/>
                            </li>
                            <li>
                                <p>微信：</p>
                                <input type="text" name="weixin"/>
                            </li>
                            <li>
                                <p>QQ：</p>
                                <input type="text" name="qq"/>
                            </li>
                            <li>
                                <p>设备唯一标识：</p>
                                <input type="text" name="deviceId"/>
                            </li>-->
                            <li class="select-time">
                                <p>最后登录时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginLastLoginTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endLastLoginTime]"/>
                            </li>
                            <!-- <li>
                                         <p>最后登录IP：</p>
                                         <input type="text" name="lastLoginIp"/>
                                     </li>
                                     <li>
                                         <p>登录次数：</p>
                                         <input type="text" name="loginCount"/>
                                     </li>
                                     <li class="select-time">
                                         <p>修改时间：</p>
                                         <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginModifiedAt]"/>
                                         <span>-</span>
                                         <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endModifiedAt]"/>
                                     </li>
                                     <li class="select-time">
                                         <p>创建时间：</p>
                                         <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreatedAt]"/>
                                         <span>-</span>
                                         <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreatedAt]"/>
                                     </li>
                                     <li>
                                         <p>注册IP：</p>
                                         <input type="text" name="createdIp"/>
                                     </li>
                                     <li>
                                         <p>是否关注公众号：</p>
                                         <input type="text" name="subscribe"/>
                                     </li>
                                     <li>
                                         <p>上传的图片头像：</p>
                                         <input type="text" name="upimages"/>
                                     </li>
                                     <li>
                                         <p>是否为志愿者：</p>
                                         <input type="text" name="isVolunteer"/>
                                     </li>
                                     <li>
                                         <p>是否是实践岗信息员：</p>
                                         <input type="text" name="isPractice"/>
                                     </li>
                                     <li>
                                         <p>是否是领导，1是，0否：</p>
                                         <input type="text" name="isLeader"/>
                                     </li>
                                     <li class="select-time">
                                         <p>绑定时间：</p>
                                         <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginBindTime]"/>
                                         <span>-</span>
                                         <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endBindTime]"/>
                                     </li>
                                     <li>
                                         <p>学习长时：</p>
                                         <input type="text" name="studyTime"/>
                                     </li>
                                     <li>
                                         <p>摄像头群组id：</p>
                                         <input type="text" name="cgid"/>
                                     </li>
                                     <li class="select-time">
                                         <p>出生日期：</p>
                                         <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginBirthday]"/>
                                         <span>-</span>
                                         <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endBirthday]"/>
                                     </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:cst_user:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:cst_user:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:cst_user:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:cst_user:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:cst_user:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:cst_user:remove')}]];
        var prefix = ctx + "system/cst_user";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "用户 - 志愿者信息",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id', 
                    title : '用户ID',
                    visible: false
                },
                    {
                        field : 'headImg',
                        title : '用户头象'
                    },
                {
                    field : 'mobile', 
                    title : '手机号'
                },
              /*  {
                    field : 'salt', 
                    title : 'null'
                },
                {
                    field : 'password', 
                    title : '用户密码双md5'
                },*/
                {
                    field : 'nickName', 
                    title : '用户名/昵称'
                },
               /* {
                    field : 'realName', 
                    title : '真实姓名'
                },
                {
                    field : 'accessToken', 
                    title : 'token'
                },
                {
                    field : 'tokenExpire', 
                    title : '过期时间'
                },*/
                {
                    field : 'integral',
                    title : '积分'
                },
                {
                    field : 'areaId', 
                    title : '区域ID'
                },
             /*   {
                    field : 'status', 
                    title : '用户状态 0 disabled, 1正常'
                },
                {
                    field : 'vid', 
                    title : '志愿者ID'
                },
                {
                    field : 'gender', 
                    title : '0未知；1男；2女'
                },
                {
                    field : 'weixin', 
                    title : '微信'
                },
                {
                    field : 'qq', 
                    title : 'QQ'
                },
                {
                    field : 'deviceId', 
                    title : '设备唯一标识'
                },*/
                {
                    field : 'lastLoginTime', 
                    title : '最后登录时间'
                },
                /*{
                    field : 'lastLoginIp', 
                    title : '最后登录IP'
                },
                {
                    field : 'loginCount', 
                    title : '登录次数'
                },
                {
                    field : 'modifiedAt', 
                    title : '修改时间'
                },
                {
                    field : 'createdAt', 
                    title : '创建时间'
                },
                {
                    field : 'createdIp', 
                    title : '注册IP'
                },
                {
                    field : 'subscribe', 
                    title : '是否关注公众号'
                },
                {
                    field : 'upimages', 
                    title : '上传的图片头像'
                },
                {
                    field : 'isVolunteer', 
                    title : '是否为志愿者'
                },
                {
                    field : 'isPractice', 
                    title : '是否是实践岗信息员'
                },
                {
                    field : 'isLeader', 
                    title : '是否是领导，1是，0否'
                },
                {
                    field : 'bindTime', 
                    title : '绑定时间'
                },
                {
                    field : 'studyTime', 
                    title : '学习长时'
                },
                {
                    field : 'cgid', 
                    title : '摄像头群组id'
                },
                {
                    field : 'address', 
                    title : '用户住址'
                },
                {
                    field : 'birthday', 
                    title : '出生日期'
                },*/
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="IntegralLog(\'' + row.id + '\')"><i class="fa fa-remove"></i>积分日志</a>');
                        /*actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');*/

                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="adjustment(\'' + row.id + '\')"><i class="fa fa-remove"></i>调整</a>');

                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
        function IntegralLog(id) {
            var url=prefix+"/Integral/" + id;
            $.modal.open("积分日志",url,'900','600');//900页面宽度  600页面高度
        }

        function adjustment(id) {
            var url=prefix+"/stment/" + id;
            $.modal.open("调整日志",url,'900','600');//900页面宽度  600页面高度
        }
    </script>
</body>
</html>